Exploiting Attribute Grammars to Achieve Automatic Tupling
نویسندگان
چکیده
Tupling of function results is a well-known technique in functional programming to avoid multiple traversals over the same data. When expressing these programs as attribute grammars, function results are expressed as shared attributes for which tupling is done automatically. In this paper we show how we can get tupling for free by using attribute grammars as an intermediate language. We evaluate the effectiveness of the approach by showing some benchmark results.
منابع مشابه
Attribute Grammars and the Teaching of Compiler Design and Implementation
Attribute grammars can help separate issues of language semantics from issues of compiler implementation. We have found that a judicious use of attribute grammars fits very well with our goals for our Compiler Design course. This paper describes the goals of our course and provides a detailed look at how attribute grammars help us to achieve these goals.
متن کاملAttribute Grammars and Automatic Complexity Analysis Attribute Grammars and Automatic Complexity Analysis Attribute Grammars and Automatic Complexity Analysis
Decomposable combinatorial structures have been well studied and a systematic manner for determining generating function equations is well known. Attribute grammars have enhanced the study of context-free grammars by giving meaning to constructions. Delest and F edou 2] showed that attribute grammars extend to combinatorial structures, with applications to random generation. In a similar way, w...
متن کاملEmbedding attribute grammars and their extensions using functional zippers
Embedding Attribute Grammars and their Extensions using Functional Zippers Attribute grammars are a suitable formalism to express complex software language analysis and manipulation algorithms, which rely on multiple traversals of the underlying syntax tree. Attribute Grammars have been extended with mechanisms such as references, higher order and circular attributes. Such extensions provide a ...
متن کاملCan we transform logic programs into attribute grammars?
In this paper we study the relationship between Attribute Grammars and Logic Programs, concentrating on transforming logic programs into attribute grammars. This has potential applications in compilation techniques for logic programs. It does not seem possible to transform arbitrary Logic Programs into Attribute Grammars, basically because the same logic variables can sometimes be used as input...
متن کاملAttribute Grammars and Automatic Complexity Analysis
Attribute grammars provide a concise way to describe traits of a wide family of structures. Structures defined by context free grammars have been well studied by Delest, Fédou and more recently by Duchon. One of the principle benefits of this approach is the easy access to multivariate generating function equations from which average and higher moments are easily accessible. This work extends t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014